<% title "Title" %>

<p>
  <strong>Programid:</strong>
  <%= @title.programId %>
</p>
<p>
  <strong>Language:</strong>
  <%= @title.language %>
</p>
<p>
  <strong>Type:</strong>
  <%= @title.type_title %>
</p>
<p>
  <strong>Text:</strong>
  <%= @title.text %>
</p>

<p>
  <strong>Synopsis:</strong>
  <% synopsis = Synopsis.where(:programId => @title.programId) %>
  <table>
  <tr>
    <th>Length</th>
    <th>Language</th>
    <th>Content</th>
  </tr>
  <% for syn in synopsis %>
      <tr>
      <td><%= syn.length %></td>
      <td><%= syn.language %></td>
      <td><%= syn.text %></td>
    </tr>
  <% end %>
</table>
</p>

<p>
  <strong>Keyword:</strong>
  <% keywords = Keywordprogram.where(:programInformationId => @title.programId) %>
  <table>
  <tr>
    <th>Type</th>
    <th>Language</th>
    <th>Text</th>
  </tr>
  <% for key in keywords %>
      <tr>
      <td><%= key.type_keyword %></td>
      <td><%= key.language %></td>
      <td><%= key.text %></td>
    </tr>
  <% end %>
</table>
</p>

